from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium import webdriver
import time

# 键盘操作
driver = webdriver.Firefox()
driver.get("https://www.baidu.com")
driver.find_element
search = driver.find_element(by=By.ID,value="kw")

search.send_keys(Keys.META,"a")
[{"title":"戒指","color":""},{}]

# time.sleep(1)
# search.send_keys("你好")
# time.sleep(2)
# #全选
# search.send_keys(Keys.CONTROL,"a")
# time.sleep(2)
# # 剪切
# search.send_keys(Keys.CONTROL,"x")
# time.sleep(2)
# # 粘贴
# search.send_keys(Keys.CONTROL,"v")
# time.sleep(2)
#
# driver.quit()
